<template>
  <div>
    <router-view></router-view>
    <!-- <div class="remark">
      <mt-field label="备注" placeholder="输入备注信息" v-model="remark"></mt-field>
    </div>-->
    <!-- 支出与收入框 -->
    <div class="switch_ei">
      <keep-alive>
        <router-link to="/home/expend" class="switch_rl1" tag="div" kee>支出</router-link>
      </keep-alive>
      <keep-alive>
        <router-link to="/home/income" class="switch_rl2" tag="div">收入</router-link>
      </keep-alive>
    </div>
    <!-- <h1 class="showNum">{{values}}</h1> -->
    <!-- <Cal @changekey="changekey" @makesure="confirm"></Cal> -->
  </div>
</template>

<script>
// import Cal from "@/components/common/cal";
export default {
  name: "Home",
  data() {
    return {
      values: 0,
    };
  },
  components: {},
  methods: {
    //输入
    // changekey(val){
    // console.log(val);
    // if(val.length<=0) return this.values = 0
    // let vals = val.join("")
    // if(val.length>0 && val.indexOf('.')!=-1) {
    // vals+='.'
    // console.log(vals);
    // }
    // let vals = val.reduce((prev,cur,index,arr)=>{
    //   return prev + cur
    // })
    // this.values = parseFloat(vals).toFixed(2)
    // console.log(vals);
    // this.values = parseInt(vals)
    //   this.values = vals
    // },
    //提交
    // confirm(val){
    //   this.values = 0
    //   console.log(val);
    // },
  },
};
</script>
<style scope>
.switch_ei {
  width: 100%;
  position: fixed;
  bottom: 290px;
  /* right: auto; */
  /* left: auto; */
  left: 1px;
  display: flex;
  background-color: #f4f4f4;
  align-items: center;
  justify-content: center;
  /* z-index: 1; */
}
.switch_ei div {
  flex: 1;
  height: 60px;
  text-align: center;
  line-height: 60px;
  font-weight: 900;
}
.switch_ei .router-link-active {
  box-shadow: 0 4px #49abf0;
  background-color: #e6edee;
}
</style>